int main()
{
    string s;
    getline(cin, s);
    string st;
    if (s[0] >= 'A' && s[0] <= 'Z')
        st.push_back(s[0]);
    else
        st.push_back((char)(s[0] - 32));

    for (int i = 1; i < s.size(); i++)
    {
        if (s[i] == ' ')
        {
            if (s[i + 1] >= 'a' && s[i + 1] <= 'z')
                st.push_back((char)(s[i + 1] - 32));
            else
                st.push_back(s[i + 1]);
        }
    }

    cout << st << endl;

    return 0;
}